<template>
  <div class="formBox">
    <t-form :model="searchData" label-width="98">
      <t-row>
        <t-col>
          <t-form-item label="护理项目名称:" name="name">
            <t-input placeholder="请输入内容" v-model="searchData.name" />
          </t-form-item>
        </t-col>

        <t-col>
          <t-form-item label="状态:" name="status">
            <t-select placeholder="请输入内容" v-model="searchData.status">
              <t-option key="0" label="禁用" value="0" />
              <t-option key="1" label="启用" value="1" />
            </t-select>
          </t-form-item>
        </t-col>
        <t-col class="searchBtn">
          <button type="button" class="bt-grey wt-60" @click="handleReset()">
            重置
          </button>

          <button type="button" class="bt wt-60" @click="handleSearch()">
            搜索
          </button>
        </t-col>
      </t-row>
    </t-form>
  </div>
</template>

<script setup  lang="ts">
import { ref } from 'vue'

//接收变量
const props = defineProps({
  searchData: Object
})

// const searchData = ref({
//     name: '',
//     status: 0
// });

//接收父组件方法
const emits = defineEmits(['handleSearch', 'handleReset'])

//搜索
const handleSearch = () => {
  emits('handleSearch')
}

//重置
const handleReset = () => {
  emits('handleReset')
}
</script>
